Robot control system

ABSTRACT

When the amount of a change in load current supplied to a grinder is not more than a predetermined threshold value, the amount of piercing into a workpiece by the grinder is controlled according to the load current. When the amount of a change in load current exceeds the predetermined threshold value, the grinding speed of the grinder is controlled according to the load current. When performing a plurality of operations with one robot, a position correction value calculated in one operation is utilized to correct a target position in another operation.

TECHNICAL FIELD

The present invention relates to robot control systems. Moreparticularly, the present invention relates to a system for controllinga robot which carries a grinding tool to grind the surface of aworkpiece and to a system for controlling a robot which uses a pluralityof tools changing from one to another to perform sequentiaI operationsassociated with the respective tools on one work-piece.

BACKGROUND ART

Industrial robots (hereinafter referred to as "robots") capable ofcarrying various kinds of tools for automatically performing associatedoperations such as welding, grinding, coating, parts assembly andinspection are well known and practically used. In the field ofgrinding, robots provided with a grinder are used in order toautomatically carry out removal of excess weld metal, finish cutting ofgroove faces after gas-shearing or finish cutting of the surfaces ofcastings. However, such robots cannot overcome the problems ofover-grinding and insufficient grinding because of the possibility ofvariations in workpiece configuration, workpiece position and the sizeof objects to be removed (e.g., flash) by grinding.

There have been proposed several automatic grinding systems providedwith a robot for the purpose of solving the above draw-back and examplesof such systems are disclosed in the following publications.

(1) Japanese Patent Laid-Open Publication No. 3-60963 (1991)

Profile grinding is performed with a grinder guided by the contour of abase metal, with the distance between the grinder and a workpiece beingadjusted such that the load current for the motor for the grinderbecomes constant.

(2) Japanese Patent Laid-Open Publication No. 3-142159 (1991)

A power sensor for detecting a reactive force transmitted from aworkpiece is attached to the wrist of a robot. Based on information fromthe power sensor, the position and power of the robot are so adjustedthat the pressing force exerted on the workpiece becomes constant. Inaddition, a set value for the pressing force is varied according to thedifference between the present position and a target position.

Apart from the above-described robot systems, there are used other typesof robot systems in which a single robot performs not only grinding butalso a plurality of similar or the same operations on one workpiece,automatically changing tool hands according to an operation to beperformed. Such systems are provided with adaptive control function forthe purpose of carrying out desired operations which are impossible tocope with by the basic function (i.e., teaching playback) of the robotalone.

These prior art systems however suffer from their inherent problems.Specifically, the grinding system of the publication (1) performsgrinding by the robot with constant pressing force so as to follow thecontour of the base metal of a workpiece, and therefore, the shape(including flash etc.) of the object to be removed before grinding isreflected in the shape of the workpiece after grinding. This means thateven though the unevenness of the workpiece can be relatively reduced,there will still remain unevenness after grinding. Such grinding systemsare suited for simple polishing but unsuited for use in grinding whichinvolves shaping operations such as removal of excess weld metal andfinish cutting of castings.

The grinding system disclosed in the publication (2) needs to attach apower sensor to the wrist of the robot and therefore requires aseparated processing unit for processing output data sent from the powersensor. This makes the whole system complicated.

In cases where a plurality of dissimilar operations are performed withone robot, if adaptive control is independently done for each operation,this requires different controllers for the respective operations,leading to the involvement of a large-scale control system. Furthermore,data obtained from the adaptive control for each operation needs to beindividually kept in each controller, which is no more effective thanthe way wherein operations are separately, individually performed.

The invention has been made with a view to solving the foregoingproblems and one of the objects of the invention is therefore to enableautomatic grinding operation including shaping with high accuracy butwithout use of a complicated System, in order to grind the surface of aworkpiece by use of a grinder loading robot. Another object of theinvention is to make it possible to share data among a plurality ofdissimilar operations which are performed with one robot, such databeing concerned with each operation as well as adaptive control, so thatdata obtained from one operation can be utilized in other operations,which allows the whole operation to be very effective.

DISCLOSURE OF THE INVENTION

The first object is accomplished by a robot control system according tothe invention for controlling a robot which carries a grinding tool togrind the surface of a workpiece, the control system comprising:

(a) load current detecting means for detecting a load current suppliedto the grinding tool;

(b) load current change detecting means for detecting the amount of achange in the load current supplied to the grinding tool;

(c) piercing amount controlling means for controlling the amount ofpiercing into the workpiece by the grinding tool according to the loadcurrent detected by the load current detecting means;

(d) grinding speed controlling means for controlling the grinding speedof the grinding tool according to the load current detected by the loadcurrent detecting means; and

(e) switching means for switching from the piercing amount controllingmeans to the grinding speed controlling means or vice versa such thatwhen the amount of a change in the load current detected by the loadcurrent change detecting means is not more than a specified thresholdvalue, the piercing amount controlling means executes its control andsuch that when the amount of a change in the load current detected bythe load current change detecting means is more than the specifiedthreshold value, the grinding speed controlling means executes itscontrol.

In the invention having the first feature, when the amount of a changein the load current supplied to the grinding tool is not more than aspecified threshold value, the piercing amount of the grinding tool withrespect to the workpiece is controlled according to the load current. Onthe other hand, when the amount of a change in the load current exceedsthe specified threshold value, the grinding speed of the grinding toolis controlled according to the load current. For parts which varysignificantly in their configuration, the grinding speed of the grindingtool is accordingly controlled so that the parts can be shaped withoutleaving any areas unground. For parts which do not have much variationin their configuration, the piercing amount of the grinding tool iscontrolled so that finishing can be performed so as to follow thecontour of the base metal of the parts. With this arrangement, largeraised parts (e.g., weirs and gates) can be finished to smooth surfaceswhile being shaped. Thus, even if the configuration or position of aworkpiece to be ground varies significantly, high-accuracy shaping intodesired forms can be achieved without involving a complicatedarrangement. Further, the control is based on load current, which makesit possible to directly monitor the state of grinding so that changes inthe grinding performance of the grind stone can be immediately copedwith.

In the invention, the piercing amount controlling means preferablyperforms its control such that when the load current is high, thepiercing amount becomes small and when the load current is low, thepiercing amount becomes large, and the grinding speed controlling meanspreferably performs its control such that when the load current is high,the grinding speed becomes low and when the load current is low, thegrinding speed becomes high.

The second object is accomplished by a robot control system according tothe invention for controlling a robot which uses a plurality of toolschanging from one to another so that a series of operations associatedwith the respective tools can be performed on one workpiece, the controlsystem comprising:

(a) target position memory means for storing a preliminarily taughttarget position for the robot;

(b) position adjusting means for adjusting the actual position of therobot so as to conform to an area in the workpiece on which an operationshould be performed;

(c) correction value memory means for storing the difference between thetarget position stored in the target position memory means and theactual position adjusted by the position adjusting means as a positioncorrection value during one operation; and

(d) correcting means for correcting a target position for the robot whenperforming another operation sequentially after said one operation,based on the position correction value which has been stored in thecorrection value memory means during said one operation.

According to the invention having the second feature, a first operationis performed, while the actual position of the robot being adjusted bythe position adjusting means such as to conform to an area in theworkpiece where operation is required to be performed. In the course ofthe first operation, the difference between the actual position of therobot and a preliminarily taught target position for the robot is storedas a position correction value in the correction value memory means.When performing a second operation sequentially after the firstoperation, the target position for the robot is corrected according tothe position correction value which has been stored in the correctionvalue memory means during the first operation. In this way, data isshared between the adaptive control in a plurality of operations andthis enables it to perform control that is impossible to carry out byadaptive control in a single operation. In addition, such arrangementdoes not involve a large-scaled control system but makes it possible tosequentially perform a plurality of different operations with highefficiency, using one robot.

It is preferable that the tool used in the first operation be replacedwith the tool to be used in the second operation by means of anautomatic replacement apparatus. With this arrangement, a series ofoperations can be perfectly automated.

It will be appreciated that the first operation may be welding while thesecond operation may be grinding performed sequentially after thewelding.

It is preferable that the target position memory means store a linesegment connecting a weld starting point with a weld finishing point asthe target position for the robot.

The position adjusting means preferably performs horizontal positioncontrol in which during weaving of a welding torch at the combining partof a weld joint, the difference between the value of welding currentwhen the welding torch is at the right end and the value of weldingcurrent when the welding torch is at the left end is made to be zero,and performs vertical position control in which the difference betweenthe value of welding current and a specified reference value is made tobe zero.

Preferably, the correction value memory means stores, as the positioncorrection value, the difference between the target position and thecenter line of weaving of the welding torch at the combining part of theweld joint.

Other objects of the present invention will become apparent from thedetailed description given hereinafter. However, it should be understoodthat the detailed description and specific examples, while indicatingpreferred embodiments of the invention, are given by way of illustrationonly, since various changes and modifications within the spirit andscope of the invention will become apparent to those skilled in the artfrom this detailed description.

BRIEF DESCRIPTION OF DRAWINGS

FIGS. 1 to 18 are associated with robot control systems according topreferred embodiments of the invention.

FIG. 1 is a system diagram showing a robot system for use in grindingoperation according to a first embodiment of the invention.

FIG. 2 is a system diagram of a robot controller according to the firstembodiment.

FIG. 3 is a flow chart of a basic program for the robot system accordingto the first embodiment.

FIG. 4 is a flow chart of a speed control executing routine.

FIG. 5 is a flow chart of a piercing control executing routine.

FIG. 6(a)-(c) are graphs showing examples of processing of a workpieceby use of the robot system according to the first embodiment.

FIG. 7 is a system diagram showing a multiple-operation robot systemaccording to a second embodiment.

FIG. 8 is a system diagram showing a robot controller according to thesecond embodiment.

FIGS. 9(a) through (c) are horizontal positions control for a weldingtorch.

FIG. 10 is a flow chart of a basic program for the multiple operationrobot system according to the second embodiment.

FIG. 11 is a flow chart of a welding routine.

FIG. 12 is a flow chart of a grinding routine.

FIG. 13 is a flow chart of an ATC routine.

FIG. 14(a) is a flow chart of a routine (a) for detaching a tool.

FIG. 14(b) is a flow chart of a routine (b) for mounting a tool.

FIG. 15 is a perspective view showing welding operation.

FIG. 16 illustrates storing of a correction value during weldingoperation.

FIGS. 17(a) and (b) illustrate retrieval of a stored correction valueduring grinding operation.

FIG. 18 illustrates a tool replacement operation.

BEST MODE FOR CARRYING OUT THE INVENTION

Referring now to the accompanying drawings, robot control systemsaccording to preferred embodiments of the invention will be described.

(First Embodiment)

In this embodiment, the invention is applied to a robot system for usein grinding operation. As shown in FIG. 1, the robot system of the firstembodiment includes (i) a grinder 2 having a grind stone 1 attachedthereto so as to be rotatable at a specified rotational speed, (ii) anarticulated robot 4 having a plurality of arms 3a, 3b and 3c which aremoved at a specified speed in relation to the grinding surface of aworkpiece, and (iii) a robot controller (robot driving control unit) 5for performing the drive control of the robot 4 (more precisely, therotation control of the grind stone 1, the position control and speedcontrol of the arms 3a, 3b and 3c etc). Connected to the robotcontroller 5 is an operating device 6 which the operator handles forsetting various conditions (teaching).

A motor (not shown) for driving the grinder 2 is powered by a powersource 7 (hereinafter referred to as "grinder power source"). The loadcurrent for this motor is detected by a current sensor 8 and a loadcurrent signal from the current sensor 8 is input in the robotcontroller 5. Other signals to be input in the robot controller 5include a positional signal which is representative of the presentposition of the robot 4 and sent from a position sensor (not shown)disposed in place in the robot 4 and a speed signal which isrepresentative of the current speed of the robot 4 and sent from a speedsensor (not shown). According to the input data, the robot controller 5performs a specified arithmetic operation to output a drive signal tothe robot 4.

FIG. 2 concretely shows the structure of the robot controller 5 of thisembodiment. As seen from FIG. 2, the robot controller 5 includes amemory unit 9 for storing working conditions such as the type of a toolto be used and desired finishing which have been set by the operatorthrough the operating device 6. A load control pattern setting unit 11inputs data sent from the memory unit 9 such as a target finishing valuerepresenting whether roughing or finishing is to be performed and inputsdata prestored in a data base unit 10. In order to cope with variousworkpiece configurations and the uses of workpieces, a control patternand set load values (a target current value, threshold value etc.) forevery tool type and every finishing goal are preliminarily entered inthe data base unit 10 Data related to a target position value and atarget speed value, which have been stored in the memory unit 9 byteaching, are sent from the memory unit 9 to a position commandcomputing unit 12.

A load current signal from the current sensor 8 is input in a loadsignal processing unit 14 through an input unit 13. The load signalprocessing unit 14 calculates a position correction value and a speedcorrection value based on the input load current signal and outputsthese correction values to the position command computing unit 12. Theposition command computing unit 12 performs calculation to generate adrive signal based on the positional signal representative of thepresent position of the robot 4, the speed signal representative of thecurrent speed of the robot 4, the target position value and target speedvalue input in the memory unit 9 and the position correction value andspeed correction value input in the load signal processing unit 14. Thedrive signal computed by the unit 12 is output to the robot 4. It shouldbe noted that signals such as a starting signal and error signal aretransmitted between the robot controller 5 and the grinder power source7.

With reference to the flow chart of a basic program shown in FIG. 3, theadaptive control for the grinder 2 performed by the robot controller 5of the above-described structure will be described in detail.

A to B: Data representative of the load current detected by the currentsensor 8 is taken in, every specified sampling time. Using the followingequation, smoothing is applied to n items of sampled data I_(in) (i) . .. I_(in) (n) which have been taken in.

    I.sub.smt (k)= I.sub.in (i)+ . . . +I.sub.in (n)!/n

C: A current difference value ΔI (m) is calculated from the sampled data(smoothed data) after smoothing, using the following equation.

    ΔI(m)= I.sub.smt (k)-I.sub.smt (k-1)!/2

D: Smoothed data items I_(smt) (k) and difference values ΔI(k), whichare both obtained from k times of previous cycles, are respectivelyaveraged using the following equations to obtain an average currentI_(avg) and an average current difference value ΔI_(avg).

    I.sub.avg = I.sub.smt (i)+ . . . +I.sub.smt (k)!/k

    ΔI.sub.avg = ΔI(i)+ . . . +ΔI(k)!/k

E to G: If the absolute value of the difference between the presentcurrent difference value ΔI_(avg) and a target current difference valueΔI_(sp) for speed control exceeds a specified threshold Th_(sp), inother words, if the time rate of change of load current is high, theflow proceeds to a speed control executing routine that will bedescribed later with reference to FIG. 4. On the other hand, if the timerate of change of load current is low, the flow proceeds to a piercingcontrol executing routine that will be described later with reference toFIG. 5.

Next, reference is made to the flow chart of FIG. 4 to describe theaforementioned speed control executing routine (Steps F).

F1 to F2: If the average current I_(avg) exceeds a preset maximumallowable load current I_(E), grinding speed SP is set to zero.

F3 to F4: If the average current I_(avg) is not more than the presetmaximum allowable load current I_(E) and exceeds an upper limit I_(L) ofa target current, the value obtained by deducting SP₀ /4 (SP₀ =initialgrinding speed) from the present grinding speed SP is set as a newgrinding speed SP.

F5 to F6: If the average current I_(avg) is not more than the upperlimit I_(H) of the target current and below a lower limit I_(L) of thetarget current, the value obtained by adding SP₀ /4 to the presentgrinding speed SP (i.e., SP+SP₀ /4) is set as a new grinding speed SP.If the average current I_(avg) is not more than the upper limit I_(H) ofthe target current and not less than the lower limit I_(L) of the targetcurrent, the presently set grinding speed SP is used as it is.

Accordingly, in such a speed control executing routine, the grindingspeed is so controlled that the load current exerted on the grinder 2fails within the range between the upper limit I_(H) and lower limitI_(L) of the target current. With the control pattern of this speedcontrol, the volume of removal from the workpiece per unit hour can beadjusted. Therefore, even if the sectional area of portions to beremoved varies in the case of processing where importance is given toshaping such as when very rough parts are finished to flat surfaces, theworkpiece can be ground according to teaching with no parts leftunground.

Next, reference is made to the flow chart of FIG. 5 to describe theaforementioned piercing control executing routine (Steps G).

G1 to G2: If the average current I_(avg) exceeds the upper limit I_(H)of the target current, the value (T-Ti) obtained by deducting a piercingcorrection value Ti from the present piercing amount T is set as a newpiercing amount T.

G3 to G4: If the average current I_(avg) is not more than the upperlimit I_(H) of the target current and less than the lower limit valueI_(L) of the target current, the value (T+Ti) obtained by adding thepiercing correction value Ti to the present piercing amount T is set asa new piercing amount T. If the average current I_(avg) is not more thanthe upper limit I_(H) of the target current and not less than the lowerlimit I_(L) of the target current, the presently set piercing amount Tis used as it is.

Accordingly, in such a piercing control executing routine, the amount ofpiercing can be controlled such that the load current exerted on thegrinder 2 falls within the range between the upper limit I_(H) and lowerlimit I_(H) of the target current. It will be understood that the volumeof removal from a workpiece per unit hour increases as the amount ofpiercing increases provided that the speed of the grinder 2 is constant.Therefore, the control pattern of the piercing control described aboveis particularly useful for processing in which smooth finishingperformed so as to follow the contour of a base metal is desired,because it is possible to adjust the amount of piercing so as to makethe load current exerted on the grinder 2 constant thereby making thevolume of removal constant.

Where a workpiece having a sectional configuration as shown in FIG. 6(a)is ground by use of the above robot system for example, the value of theload current detected by the current sensor 8 and the current differencevalue are represented by the curves shown in FIGS. 6(b) and 6(c)respectively. If the control of the first embodiment is applied to sucha workpiece, the speed control is executed in the regions marked with Pand the piercing control is executed in the regions marked with Q inFIG. 6(a). As a result, shaping can be performed leaving no partsunground in the areas having significant variations in configurationwhereas finishing can be performed so as to follow the contour of thebase metal in the areas having minor variations in configuration.Accordingly, even if the workpiece to be ground has large raised partslike the weirs or gates of castings, the workpiece can be finished tosmooth surfaces while being shaped.

While the first embodiment has been described with a case where thespeed control and the piercing control are automatically switchedaccording to whether the amount of a change in the load current appliedto the grinder 2 is large or small, the robot system of the invention isalso applicable to a case where processing in which importance is givento shaping (e.g., when finishing is performed after roughing) andprocessing in which importance is given to smooth finishing areseparately performed in different procedures.

(Second Embodiment)

In this embodiment, the invention is applied to a multiple-operationrobot system which performs welding operation using a welding torch as aworking tool and then performs grinding operation sequentially after thewelding operation, replacing the welding torch with a grinder.

It is understood from FIG. 7 that the robot 4 having a plurality of arms3a, 3b and 3c in the multiple-operation robot system of the secondembodiment does not differ basically in the main body structure from therobot of the first embodiment. In the second embodiment, an automatictool changer 20 is employed to automatically change working tools from awelding torch 21 to the grinder 2. There is also provided a robotcontroller 22 which executes the adaptive control of the grinder 2 asdescribed in the first embodiment and the adaptive control of thewelding torch 21 to be described later. This robot controller 22 isconnected to an operating device 23 through which the operator sets(teaches) various conditions.

A motor (not shown) for driving the grinder 2 is powered by the grinderpower source 7. The load current of the motor is detected by the currentsensor 8 which in turn issues a grinder load current signal to the robotcontroller 22. The welding torch 21 is provided with welding currentsupplied from a welding power source 24. The welding current suppliedfrom the welding power source 24 is detected by a current sensor 25which in turn issues a welding current signal to the robot controller22. Like the first embodiment, the robot controller 22 inputs apositional signal which represents the present position of the robot 4and is sent from a position sensor (not shown) disposed in place on therobot 4 and a speed signal which represents the current speed of therobot 4 and is sent from a speed sensor (not shown). Based on theseinput signals, the robot controller 22 performs specified arithmeticoperation and outputs a drive signal to the robot 4. It should be notedthat signals such as a starting signal and error signal are transmittedbetween the robot controller 22 and the grinder power source 7 andbetween the robot controller 22 and the welding power source 24.

FIG. 8 concretely shows the structure of the robot controller 22 of thesecond embodiment. As seen from FIG. 8, the robot controller 22 includesa position control unit 26 for controlling the basic position and speedof the robot 4; an adaptive control unit 27 for executing adaptivecontrol according to the type of an operation to be performed; and adata base unit 28 in which a control pattern, parameters andinput/output setting for adaptive control for each type of operation(each tool) are entered.

Commands for instructing the position and speed of the robot 4 which areset for every step by the operator through the operating device 23according to the operation to be performed are once stored in a commandmemory unit 29 incorporated in the robot controller 22 and analyzed by amain control section 26a of the position control unit 26. When therearises a need for the adaptive control corresponding to the operation tobe performed, the main control unit 26a sends an operation start commandand information on the type of the operation to be performed to anadaptive control setting section 27a of the adaptive control unit 27.Upon receipt of the operation start command, the adaptive controlsetting section 27a sets an adaptive control pattern and parameterswhich correspond to the operation to be performed, reading them from thedata base unit 28 and also executes input/output setting. Aftercompletion of the setting in the adaptive control setting section 27a, acorrection value computing section 27b of the adaptive control unit 27sequentially computes a position correction value and a speed correctionvalue from a grinder load current signal or welding current signal whichhas been received through an input device 30. These computed values areoutput to a position command computing section 26b of the positioncontrol unit 26 and output to periphery devices through an output device31. In the position command computing section 26b, a drive signal iscomputed based on a position signal representative of the presentposition of the robot 4, a speed signal representative of the presentspeed of the robot 4, a position target value and speed target valuewhich have been input from the main control section 26a, and a positioncorrection value and speed correction value which have been input fromthe correction value computing section 27b. The computed drive signal isoutput to the robot 4. The position correction value and speedcorrection value are stored in a correction value memory unit 32 andread from the correction value memory unit 32 as required in thecalculation to generate the drive signal.

The details of the adaptive control for the grinder 2 have been alreadydescribed in the first embodiment. In the adaptive control for thewelding torch 21, two kinds of control i.e., horizontal position (theposition with respect to a direction transverse to the travelingdirection of the torch 21) control and vertical position (level) controlare performed simultaneously in the following manner.

In the horizontal position control, when the welding torch 21 is movedalong the joint of materials to be welded 33, 34, a weaving motion isimparted to the welding torch 21 so as to laterally weave in asinusoidal manner, and the horizontal position of the welding torch 21is adjusted such that the difference between the welding current (arccurrent) when the welding torch 21 is at the right end and the weldingcurrent when the welding torch 21 is at the left end becomes zero, thesecurrents being detected by the current sensor 25 during the weavingmovement. FIG. 9(a)shows the state in which the welding torch 21 isoffset to the left so that the peak value of welding current when thetorch 21 is at the left end is greater than the peak value of weldingcurrent at the right end by the difference p. FIG. 9(c) shows the statein which the welding torch 21 is offset to the right with the peak valueof welding current when the torch 21 is at the right end being greaterthan the peak value of welding current at the left end by the differenceq. Thus, when there occurs a difference between the peak values ofwelding current when the welding torch 21 is at the right end and whenit is at left end, the position control of the welding torch 21 isexecuted to make the difference be zero as shown in FIG. 9(b).

In the vertical position control, the low frequency components ofwelding current are taken out thereby to detect the average verticalposition (average level) of the welding torch 21. This average positionis compared with a preset reference value and the vertical position ofthe welding torch 21 is adjusted such that the difference between theaverage position and the reference value becomes zero.

In the multiple operation robot system of the second embodiment, theadaptive control for the welding torch is switched to the adaptivecontrol for the grinder, these adaptive control being mainly intended toautomatically correct the displacement of a tool from a position taughtby the operator, and the correction values stored in the correctionvalue memory unit 32 during the adaptive control for the welding torch21 are utilized in the adaptive control for the grinder 2. This enablesit to correct the displacement of the grinder 2 in a directionperpendicular to the grinding line on the grinding plane, which isgenerally uncorrectable by the adaptive control for the grinder 2.

Next, reference is made to the flow charts of FIGS. 10 to 14 to describethe details of the control performed when grinding is carded outsequentially after welding.

FIG. 10 is a flow chart of a basic program. In this basic program, awelding routine is first called (Step S) and then a grinding routine iscalled (Step T).

The welding routine is executed according to the flow chart of FIG. 11.

S1: Initialization is executed. In this initialization, a tool requestsignal is set to 1 (which represents the welding torch) while toolparameters corresponding to the welding torch are read from a toolparameter table in order to set them. Then, the control point is shiftedto the point indicated by the tool parameters. It should be noted thatthe tool parameters are the values of the length, angle and otherfactors of a tool, which are represented by points in a coordinatesystem fixed on a six-axes flange face of the robot 4.

S2 to S4: An ATC routine that will be described later with reference tothe flow chart of FIG. 13 is called and the welding torch 21 is mountedon the robot 4. The robot 4 is then moved to a search starting point P₀(the position of the workpiece with respect to the z-direction, whichhas been taught by the operator before-hand). Thereafter, a searchroutine for correcting the displacement of a weld starting point iscalled. It should be noted that in this search routine, the end facepositions P₀ (z-direction), P₁ (y-direction) and P₂ (x-direction)of theworkpiece W taught by the operator are set as search starting points(see FIG. 15) and with these search starting points, searching operationis performed in a preliminarily taught direction in order to obtain thepresent position (P₀₁, P₁₁,P₂₁) of the workpiece W represented by thebase coordinate system for the robot 4. The search operation isperformed for example in such a manner that the welding torch 21 ismoved toward the workpiece W while the conductive state of the weldingtorch 21 being monitored and that the movement of the welding torch 21is stopped when it is in a conductive state. In this way, the differencebetween the present position of the workpiece W and the taught positionof the workpiece W is obtained and with this difference, thedisplacement of the weld starting point P₃ can be corrected by thefollowing equations. Note that the value of the weld starting pointafter correction is denoted by P_(3new) and the value of the same beforecorrection is denoted by P_(3old).

    P.sub.3new,x =P.sub.3old,x +(P.sub.21x -P.sub.2x)

    P.sub.3new,y =P.sub.3old,y +(P.sub.11y -P.sub.1y)

    P.sub.3new,z =P.sub.3old,z +(P.sub.01z -P.sub.0z)

S5 to S6: The welding torch 21 is moved to the weld starting point P₃and welding conditions are read from the data base section 28. Then, aninstruction for the welding power source 24 and the correspondingadaptive control are set.

S7: A weld starting procedure is taken. More precisely, instructions oncurrent and voltage as well as a start command are sent to the weldingpower source 24 while the adaptive control is initiated by the adaptivecontrol unit 27. In this adaptive control, the correction valuecomputing section 27b calculates a correction value for the positionwith respect to the x-direction (horizontal direction) in the same wayas described earlier (a correction value for the position with respectto the z-direction (vertical direction) can be also calculatedlikewise). The correction value is sent to the position commandcomputing section 26b which in turn converts the correction value intocoordinates in the base coordinate system of the robot 4 to add to apresent target value so that a new target value can be obtained.Further, the difference (ΔW_(n) =P_(n),new -P_(n),old) between thetarget value P_(n),new incorporating the correction value and the targetvalue P_(n),old taught by the operator for the present processing cycleis stored (see FIG. 16). Note that the difference value ΔW_(n) is anintegrated correction value represented by the robot base coordinatesystem. Then, the difference (ΔP_(n) =ΔW_(n) -ΔW_(n-1)) between thedifference value ΔW_(n) and the difference value ΔW_(n-1) in thepreceding processing cycle is stored in the correction value memory unit32. Note that the difference value ΔP_(n) is the difference between theintegrated value up to the preceding cycle and the integrated value upto the present cycle.

S8 to S10: While the adaptive control and the storage of the correctionvalue being executed, the welding torch 21 is linearly moved to awelding end point P₄. After the welding torch 21 has reached the weldingend point P₄, a weld termination procedure is taken. More specifically,a termination command is issued to the welding power source 24 and theadaptive control is stopped. After that, the welding torch 21 is movedto a preliminarily taught stand-by point to complete the weldingroutine.

Then, the grinding routine is executed according to the flow chart ofFIG. 12.

T1: Initialization is executed. This initialization is similar to theinitialization in the welding routine. Specifically, the tool requestsignal is set to 2 (which represents a grinder) and tool parameterscorresponding to a grinder are read from the tool parameter table to setthem. Thereafter, the control point is shifted to the point indicated bythese tool parameters.

T2 to T4: The ATC routine to be described later with reference to theflow chart of FIG. 13 is called while the welding torch 21 is detachedand the grinder 2 is mounted. Then, the robot 4 is moved to the startingpoint P₃ (grind starting point) on which a correction has been made inthe welding routine. After grinding conditions are read from the database unit 28, the value of a command for the grinder power source 7 andthe corresponding adaptive control are set.

T5: A grind starting procedure is taken, in which an operation startingcommand is sent to the grinder power source 7 and the adaptive controlunit 27 starts the corresponding adaptive control. In this adaptivecontrol, the correction value computing section 27b calculates acorrection value for the z-direction based on a load current signal fromthe current sensor 8 and this calculated correction value is sent to theposition command computing section 26b, as described earlier in thefirst embodiment. For regeneration of the stored data, the positioncommand computing section 26b reads the correction value ΔP_(n) whichhas been stored in the correction value memory unit 32 during theadaptive control of the welding torch 21. Then, this correction valueΔP_(n) is added to a target value P_(n),old taught by the operator, sothat a new target value P_(n),new can be obtained. In the meantime, thecorrection value computing section 27b calculates a correction valueΔG_(n) and converts it into coordinates on the robot base coordinatesystem to add to the target value P_(n),new calculated in thisoperation, so that a real target value P_(n),real can be obtained.

FIG. 17 shows one example of the calculating procedure for obtaining thereal target value P_(n),real in the adaptive control of the grinder 2.The example shown in FIG. 17 is a case where only the correction valueΔP_(n) for the x-direction is stored during the adaptive control of thewelding torch 21 and a correction is made to only the position withrespect to the z-direction during the adaptive control of the grinder 2.As illustrated in FIG. 17(a), the target value P_(n),new incorporatingthe stored correction value is obtained from the target value P_(n),oldin the taught data, using the following equation.

    P.sub.n,new =P.sub.n,old +ΔP

ΔP: stored integrated correction value

Then, the correction value ΔG_(n) obtained in the adaptive control ofthe grinder is added to the target value P_(n),new obtained from theabove equation as shown in FIG. 17(b) so that a real target valueP_(n),real can be obtained. This is described by the following equation.

    P.sub.n,real =P.sub.n,new +ΔG.sub.n

T6 to T8: While performing the adaptive control and the regeneration ofthe correction value, the grinder 2 is linearly moved to a grinding endpoint P₄. After the grinder 2 has reached the end point P₄, a grindtermination procedure is taken, in which a termination command is issuedto the grinder 2 and the adaptive control is stopped. After that, thegrinder 2 is moved to a preliminarily taught stand-by point thereby tocomplete the grinding routine.

The procedure of the ATC routine (Step S2 in FIG. 11 and Step T2 in FIG.12) will be described below, with reference to the flow chart of FIG.13.

U1 to U4: When a tool identification signal for informing a presentlymounted tool indicates 0 (nothing), if the tool request signal indicates1 (welding torch), the tool 1 (welding torch) is mounted, and if thetool request signal indicates 2 (grinder), the tool 2 (grinder) ismounted.

U5 to U7: When the tool identification signal indicates 1 (weldingtorch), if the tool request signal indicates 1 (welding torch), toolreplacement is unnecessary so that the flow is ended as it is, and ifthe tool request signal indicates 2 (grinder), the presently mountedtool 1 (welding torch) is detached and the tool 2 (grinder) is mounted.

U8 to U10: When a tool identification signal indicates 2 (grinder), ifthe tool request signal indicates 2 (grinder), tool replacement isunnecessary so that the flow is ended as it is, and if the tool requestsignal indicates 1 (welding torch), the presently mounted tool 2(grinder) is detached and the tool 1 (welding torch) is mounted.

FIG. 14 shows a routine for tool detachment (a) and a routine for toolmounting (b). The tool replacement is performed in such a way that thearm end (wrist) 3c of the robot 4 is moved as shown in FIG. 18 toward atool stand 35 where the grinder 2 and the welding torch 21 are placedand a new tool is mounted after detaching the presently held tool. Theflow chart of FIG. 14 is described in conjunction with FIG. 18.

V1 to V4: For detaching the tool 1 (welding torch 21), the arm 3c islinearly moved to a position P_(t12) after moving to a position P_(t11)and then an ATC clamp signal is turned off to allow the tool 1 to beheld by the tool stand 35. Then, the arm 3c is linearly moved to aposition P_(t13). Similarly, for detaching the tool 2 (grinder 2), thearm 3c is linearly moved to a position P_(t22) after moving to aposition P_(t21) and then the ATC clamp signal is turned off to allowthe tool 2 to be held by the tool stand 35. Thereafter, the arm 3c islinearly moved to a position P_(t23).

W1 to W4: For mounting the tool 1 (welding torch 21), the arm 3c islinearly moved to the position P_(t12) after moving to the positionP_(t11) and then, the ATC clamp signal is turned on to allow the arm 3cto grasp the tool 1 stored in the tool stand 35. After that, the arm 3cis linearly moved to the position P_(t13). Similarly, for mounting thetool 2 (grinder 2), the arm 3c is linearly moved to the position P_(t22)after moving to the position P_(t21). Sequentially, the ATC clamp signalis turned on to allow the arm 3c to grasp the tool 2 stored in the toolstand 35 and then, the arm 3c is linearly moved to the position P_(t23).

By use of the multi-operation robot system according to the secondembodiment, data can be shared between the adaptive control of weldingoperation and the adaptive control of grinding operation. This enablesthe position control of the grinder with respect to a directionperpendicular to the grinding line (i.e., a direction transverse to thetraveling direction of the grinder) on the grinding plane, such controlbeing principally impossible with information obtained in grindingoperation and the adaptive control for grinding. Accordingly, in therobot control system of the second embodiment, the adaptive control forone operation and the adaptive control for the other operationadvantageously complement each other, which makes it possible to performcontrol that is impossible in a single operation. In addition, highefficiency can be achieved without use of a large-scaled control systemwhen successively carrying out different types of operations with asingle robot.

While the invention has been particularly described with a case wheregrinding operation is carried out sequentially after welding operationin the foregoing embodiment, the invention is not limited to such a casebut applicable to other cases where correction of the path of a robotarm is required in a series of operations, such as when an operation forinspecting defects in a weld part (e.g., ultrasonic inspection) issequentially carried out after welding.

The invention being thus described, it will be obvious that the same maybe varied in many ways. Such variations are not to be regarded as adeparture from the spirit and scope of the invention, and all suchmodifications as would be obvious to one skilled in the art are intendedto be included within the scope of the following claims.

We claim:
 1. A robot control system for controlling a robot whichcarries a grinding tool to grind the surface of a workpiece, the controlsystem comprising:(a) load current detecting means for detecting a loadcurrent supplied to the grinding tool; (b) load current change detectingmeans for detecting the amount of a change in the load current suppliedto the grinding tool; (c) piercing amount controlling means forcontrolling the amount of piercing into the workpiece by the grindingtool according to the load current detected by the load currentdetecting means; (d) grinding speed controlling means for controllingthe grinding speed of the grinding tool according to the load currentdetected by the load current detecting means; and (e) switching meansfor switching from the piercing amount controlling means to the grindingspeed controlling means or vice versa such that when the amount of achange in the load current detected by the load current change detectingmeans is not more than a specified threshold value, the piercing amountcontrolling means executes its control and such that when the amount ofa change in the load current detected by the load current changedetecting means is more than the specified threshold value, the grindingspeed controlling means executes its control.
 2. A robot control systemaccording to claim 1, wherein the piercing amount controlling meansperforms control such that when the load current is high, the piercingamount becomes small and when the load current is low, the piercingamount becomes large, and wherein the grinding speed controlling meansperforms control such that when the load current is high, the grindingspeed becomes low and when the load current is low, the grinding speedbecomes high.